package com.ctcemti.mdm.common.result;

/**
 * 错误码枚举（固定值 0:成功，-1:系统错误）
 * 需要与前端的zh.js里的code对应
 */
public enum ResultEnum {

    SUCCESS(2000, "成功"),
    ZTSJ_1000(1000, "操作记录不能为空"),
    ZTSJ_1001(1001, "不能为空"),
    ZTSJ_1002(1002, "没有用户"),
    ZTSJ_1003(1003, "账号或密码错误"),
    ZTSJ_1004(1004, "密码或账号不能为空"),
    ZTSJ_1005(1005, "名称重复"),
    ZTSJ_1006(1006, "删除失败"),
    ZTSJ_1007(1007, "用户名称重复"),
    ZTSJ_1008(1008, "参数错误"),
    ZTSJ_1009(1009, "sql异常"),
    ZTSJ_1010(1010, "不确定异常"),
    ZTSJ_1011(1011, "参数错误"),
    ZTSJ_1012(1012, "账号被注销"),
    ZTSJ_1013(1013, "未登录"),
    ZTSJ_1014(1014, "无法删除"),
    ZTSJ_1015(1015, "运行错误"),
    ZTSJ_1016(1016, "请求格式错误"),
    ZTSJ_1017(1017, "安全验证失败"),
    ZTSJ_1018(1018, "服务启动失败"),
    ZTSJ_1019(1019, "mybatis错误"),
    ZTSJ_1020(1020, "资源不存在"),
    ZTSJ_1021(1021, "文件上传失败"),
    ZTSJ_1100(1100, "专业下有企业级EBS树，无法删除"),
    ZTSJ_1101(1101, "token不合法"),
    ZTSJ_1102(1102, "非法访问"),
    ZTSJ_1103(1103, "无法连接数据库");

    private Integer code;

    private String msg;

    private String now;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
